//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
//////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2003 Intrinsyc Europe Ltd.
//////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2004 Siemens AG
//
// Version: 1.1.2.5
// Date:    11. Jan. 2006
//////////////////////////////////////////////////////////////////////////////


#pragma once

#define NETWK_CMDBUF_LENGTH      (MAX_ATCMD_LEN)
// We do not need this calculation: any string from or to the AT interface will not exceed MAX_ATCMD_LEN character
//#define NETWK_CMDBUF_LENGTH      (MAX_PATH + MAXLENGTH_OPERATOR)
#define NETWK_ALLOC_NUMBER        1

#define NO_INIT_COPS_SETTING 	0xff

#define NEED_SPLW_WORKAROUND (((g_dwModemType == MODEMTYPE_SIEMENS_MC75) && (g_dwModemVersion < 2001)) || (g_dwModemType == MODEMTYPE_SIEMENS_TC63))
//
// Registration status values
//
const DWORD g_rgdwRegStats[] =
{
    RIL_REGSTAT_UNREGISTERED,       // 0
    RIL_REGSTAT_HOME,               // 1
    RIL_REGSTAT_ATTEMPTING,         // 2
    RIL_REGSTAT_DENIED,             // 3
    RIL_REGSTAT_UNKNOWN,            // 4
    RIL_REGSTAT_ROAMING,            // 5
};
#define NUM_REGSTATS    (sizeof(g_rgdwRegStats) / sizeof(DWORD))


//
// Operator formats
//
static const DWORD g_rgdwOperFormats[] =
{
    RIL_OPFORMAT_LONG,          // 0
    RIL_OPFORMAT_SHORT,         // 1
    RIL_OPFORMAT_NUM,           // 2
};
#define NUM_OPERFORMATS (sizeof(g_rgdwOperFormats) / sizeof(DWORD))


//
// Operator numeric name to operator long name map
//
struct OPERATORNAMEMAP {
    UINT nNumericName;
    LPCSTR szLongName;
    LPCSTR szCountryCode;
};


HRESULT RILDrv_GetSubscriberNumbers(DWORD dwParam);
HRESULT RILDrv_GetOperatorList(DWORD dwParam);
HRESULT RILDrv_GetPreferredOperatorList(DWORD dwParam, DWORD dwFormat);
HRESULT RILDrv_AddPreferredOperator(DWORD dwParam, DWORD dwIndex, const RILOPERATORNAMES* lpOperatorNames);
HRESULT RILDrv_RemovePreferredOperator(DWORD dwParam, DWORD dwIndex);
HRESULT RILDrv_GetCurrentOperator(DWORD dwParam, DWORD dwFormat);
HRESULT RILDrv_RegisterOnNetwork(DWORD dwParam, DWORD dwMode, const RILOPERATORNAMES* lpOperatorNames);
HRESULT RILDrv_UnregisterFromNetwork(DWORD dwParam);
HRESULT RILDrv_GetRegistrationStatus(DWORD dwParam);
HRESULT RILDrv_GetAllOperatorsList(DWORD dwParam);

HRESULT ParseGetCurrentOperator(LPCSTR szRsp, void*& pBlob, UINT& cbBlob, LPVOID pParam);
HRESULT ParseGetRegistrationStatus(LPCSTR szRsp, void*& pBlob, UINT& cbBlob, LPVOID pParam);

#define MAX_PPLMN_BUFFER          255
#define PPLMN_BUFFER_NOT_FILLED   (MAX_PPLMN_BUFFER+1)

